<?php
/*
 * Copyright 2011 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * The Moderator service implementation
 *
 * Generated by http://code.google.com/p/google-api-php-client/
 * Generated from: https://www.googleapis.com/discovery/v0.3/describe/moderator/v1
 **/
class ModeratorTopicsResourcePartial {
  public $id;
}

class ModeratorTopicsResourcePartialId {
  public $seriesId;
  public $topicId;
}

class ModeratorVotesResourcePartial {
  public $flag;
  public $vote;
}

class Profile {
  public $attribution;
  public $id;
  public $kind;
}

class ProfileId {
  public $user;
}

class ProfileAttribution {
  public $avatarUrl;
  public $displayName;
  public $geo;
  public $location;
}

class ProfileAttributionGeo {
  public $latitude;
  public $location;
  public $longitude;
}

class Series {
  public $anonymousSubmissionAllowed;
  public $counters;
  public $description;
  public $id;
  public $kind;
  public $name;
  public $numTopics;
  public $videoSubmissionAllowed;
}

class SeriesId {
  public $seriesId;
}

class SeriesCounters {
  public $anonymousSubmissions;
  public $minusVotes;
  public $noneVotes;
  public $plusVotes;
  public $submissions;
  public $users;
  public $videoSubmissions;
}

class SeriesList {
  public $items;
  public $kind;
}

class Submission {
  public $attachmentUrl;
  public $attribution;
  public $author;
  public $counters;
  public $created;
  public $geo;
  public $id;
  public $kind;
  public $parentSubmissionId;
  public $text;
  public $topics;
  public $translations;
  public $vote;
}

class SubmissionParentSubmissionId {
  public $seriesId;
  public $submissionId;
}

class SubmissionId {
  public $seriesId;
  public $submissionId;
}

class SubmissionGeo {
  public $latitude;
  public $location;
  public $longitude;
}

class SubmissionCounters {
  public $minusVotes;
  public $noneVotes;
  public $plusVotes;
}

class SubmissionAttribution {
  public $avatarUrl;
  public $displayName;
  public $location;
}

class SubmissionList {
  public $items;
  public $kind;
}

class Tag {
  public $id;
  public $kind;
  public $text;
}

class TagId {
  public $seriesId;
  public $submissionId;
  public $tagId;
}

class TagList {
  public $items;
  public $kind;
}

class Topic {
  public $counters;
  public $description;
  public $featuredSubmission;
  public $id;
  public $kind;
  public $name;
  public $presenter;
  public $rules;
}

class TopicRules {
  public $submissions;
  public $votes;
}

class TopicRulesVotes {
  public $close;
  public $open;
}

class TopicRulesSubmissions {
  public $close;
  public $open;
}

class TopicId {
  public $seriesId;
  public $topicId;
}

class TopicCounters {
  public $minusVotes;
  public $noneVotes;
  public $plusVotes;
  public $submissions;
  public $users;
  public $videoSubmissions;
}

class Topic2 {
  public $counters;
  public $description;
  public $featuredSubmission;
  public $id;
  public $kind;
  public $name;
  public $presenter;
  public $rules;
}

class Topic2Rules {
  public $submissions;
  public $votes;
}

class Topic2RulesVotes {
  public $close;
  public $open;
}

class Topic2RulesSubmissions {
  public $close;
  public $open;
}

class Topic2Id {
  public $seriesId;
  public $topicId;
}

class Topic2Counters {
  public $minusVotes;
  public $noneVotes;
  public $plusVotes;
  public $submissions;
  public $users;
  public $videoSubmissions;
}

class TopicList {
  public $items;
  public $kind;
}

class Vote {
  public $flag;
  public $id;
  public $kind;
  public $vote;
}

class VoteId {
  public $seriesId;
  public $submissionId;
}

class VoteList {
  public $items;
  public $kind;
}

class apiModeratorService {

  // Variables that the apiServiceResource implementation depends on
  private $serviceName = 'moderator';
  private $version = 'v1';
  private $restBasePath = '/moderator/v1/';
  private $rpcPath = '/rpc';
  private $io;
  // apiServiceResource's that are used internally
  private $featured;
  private $global;
  private $my;
  private $myrecent;
  private $profiles;
  private $responses;
  private $series;
  private $submissions;
  private $tags;
  private $topics;
  private $votes;

  /**
   * Constructs the internal service representations and does the auto-magic configuration required to drive them
   */
  public function __construct(apiClient $apiClient) {
    $apiClient->addService('moderator', 'v1');
    $this->io = $apiClient->getIo();
    $this->featured = new apiServiceResource($this, $this->serviceName, 'featured', json_decode('{"resources":{"series":{"methods":{"list":{"restPath":"series\/featured","rpcMethod":"moderator.featured.series.list","httpMethod":"GET","description":"Lists the featured series.","response":{"$ref":"SeriesList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}}}', true));
    $this->global = new apiServiceResource($this, $this->serviceName, 'global', json_decode('{"resources":{"series":{"methods":{"list":{"restPath":"search","rpcMethod":"moderator.global.series.list","httpMethod":"GET","description":"Searches the public series and returns the search results.","parameters":{"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"}},"response":{"$ref":"SeriesList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}}}', true));
    $this->my = new apiServiceResource($this, $this->serviceName, 'my', json_decode('{"resources":{"series":{"methods":{"list":{"restPath":"series\/@me\/mine","rpcMethod":"moderator.my.series.list","httpMethod":"GET","description":"Lists all series created by the authenticated user.","response":{"$ref":"SeriesList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}}}', true));
    $this->myrecent = new apiServiceResource($this, $this->serviceName, 'myrecent', json_decode('{"resources":{"series":{"methods":{"list":{"restPath":"series\/@me\/recent","rpcMethod":"moderator.myrecent.series.list","httpMethod":"GET","description":"Lists the series the authenticated user has visited.","response":{"$ref":"SeriesList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}}}', true));
    $this->profiles = new apiServiceResource($this, $this->serviceName, 'profiles', json_decode('{"methods":{"get":{"restPath":"profiles\/@me","rpcMethod":"moderator.profiles.get","httpMethod":"GET","description":"Returns the profile information for the authenticated user.","response":{"$ref":"Profile"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"update":{"restPath":"profiles\/@me","rpcMethod":"moderator.profiles.update","httpMethod":"PUT","description":"Updates the profile information for the authenticated user.","request":{"$ref":"Profile"},"response":{"$ref":"Profile"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}', true));
    $this->responses = new apiServiceResource($this, $this->serviceName, 'responses', json_decode('{"methods":{"insert":{"restPath":"series\/{seriesId}\/topics\/{topicId}\/submissions\/{parentSubmissionId}\/responses","rpcMethod":"moderator.responses.insert","httpMethod":"POST","description":"Inserts a response for the specified submission in the specified topic within the specified series.","parameters":{"anonymous":{"restParameterType":"query","description":"Set to true to mark the new submission as anonymous.","type":"boolean"},"parentSubmissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the parent Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"topicId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Topic within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","topicId","parentSubmissionId"],"request":{"$ref":"Submission"},"response":{"$ref":"Submission"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"list":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/responses","rpcMethod":"moderator.responses.list","httpMethod":"GET","description":"Lists or searches the responses for the specified submission within the specified series and returns the search results.","parameters":{"author":{"restParameterType":"query","description":"Restricts the results to submissions by a specific author.","type":"string"},"hasAttachedVideo":{"restParameterType":"query","description":"Specifies whether to restrict to submissions that have videos attached.","type":"boolean"},"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"sort":{"restParameterType":"query","description":"Sort order.","type":"string"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","submissionId"],"response":{"$ref":"SubmissionList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}', true));
    $this->series = new apiServiceResource($this, $this->serviceName, 'series', json_decode('{"methods":{"get":{"restPath":"series\/{seriesId}","rpcMethod":"moderator.series.get","httpMethod":"GET","description":"Returns the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"response":{"$ref":"Series"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"insert":{"restPath":"series","rpcMethod":"moderator.series.insert","httpMethod":"POST","description":"Inserts a new series.","request":{"$ref":"Series"},"response":{"$ref":"Series"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"list":{"restPath":"series","rpcMethod":"moderator.series.list","httpMethod":"GET","description":"Searches the series and returns the search results.","parameters":{"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"}},"response":{"$ref":"SeriesList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"update":{"restPath":"series\/{seriesId}","rpcMethod":"moderator.series.update","httpMethod":"PUT","description":"Updates the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"request":{"$ref":"Series"},"response":{"$ref":"Series"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}},"resources":{"responses":{"methods":{"list":{"restPath":"series\/{seriesId}\/responses","rpcMethod":"moderator.series.responses.list","httpMethod":"GET","description":"Searches the responses for the specified series and returns the search results.","parameters":{"author":{"restParameterType":"query","description":"Restricts the results to submissions by a specific author.","type":"string"},"hasAttachedVideo":{"restParameterType":"query","description":"Specifies whether to restrict to submissions that have videos attached.","type":"boolean"},"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"sort":{"restParameterType":"query","description":"Sort order.","type":"string"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"response":{"$ref":"SeriesList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}},"submissions":{"methods":{"list":{"restPath":"series\/{seriesId}\/submissions","rpcMethod":"moderator.series.submissions.list","httpMethod":"GET","description":"Searches the submissions for the specified series and returns the search results.","parameters":{"author":{"restParameterType":"query","description":"Restricts the results to submissions by a specific author.","type":"string"},"hasAttachedVideo":{"restParameterType":"query","description":"Specifies whether to restrict to submissions that have videos attached.","type":"boolean"},"includeVotes":{"restParameterType":"query","description":"Specifies whether to include the current user\'s vote","type":"boolean"},"lang":{"restParameterType":"query","description":"The language code for the language the client prefers resuls in.","type":"string"},"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"sort":{"restParameterType":"query","description":"Sort order.","type":"string"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"response":{"$ref":"SubmissionList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}}}', true));
    $this->submissions = new apiServiceResource($this, $this->serviceName, 'submissions', json_decode('{"methods":{"get":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}","rpcMethod":"moderator.submissions.get","httpMethod":"GET","description":"Returns the specified submission within the specified series.","parameters":{"includeVotes":{"restParameterType":"query","description":"Specifies whether to include the current user\'s vote","type":"boolean"},"lang":{"restParameterType":"query","description":"The language code for the language the client prefers resuls in.","type":"string"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","submissionId"],"response":{"$ref":"Submission"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"insert":{"restPath":"series\/{seriesId}\/topics\/{topicId}\/submissions","rpcMethod":"moderator.submissions.insert","httpMethod":"POST","description":"Inserts a new submission in the specified topic within the specified series.","parameters":{"anonymous":{"restParameterType":"query","description":"Set to true to mark the new submission as anonymous.","type":"boolean"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"topicId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Topic within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","topicId"],"request":{"$ref":"Submission"},"response":{"$ref":"Submission"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}', true));
    $this->tags = new apiServiceResource($this, $this->serviceName, 'tags', json_decode('{"methods":{"delete":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/tags\/{tagId}","rpcMethod":"moderator.tags.delete","httpMethod":"DELETE","description":"Deletes the specified tag from the specified submission within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"tagId":{"restParameterType":"path","required":true,"type":"string"}},"parameterOrder":["seriesId","submissionId","tagId"],"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"insert":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/tags","rpcMethod":"moderator.tags.insert","httpMethod":"POST","description":"Inserts a new tag for the specified submission within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","submissionId"],"request":{"$ref":"Tag"},"response":{"$ref":"Tag"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"list":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/tags","rpcMethod":"moderator.tags.list","httpMethod":"GET","description":"Lists all tags for the specified submission within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","submissionId"],"response":{"$ref":"TagList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}', true));
    $this->topics = new apiServiceResource($this, $this->serviceName, 'topics', json_decode('{"methods":{"get":{"restPath":"series\/{seriesId}\/topics\/{topicId}","rpcMethod":"moderator.topics.get","httpMethod":"GET","description":"Returns the specified topic from the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"topicId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Topic within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","topicId"],"response":{"$ref":"Topic2"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"insert":{"restPath":"series\/{seriesId}\/topics","rpcMethod":"moderator.topics.insert","httpMethod":"POST","description":"Inserts a new topic into the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"request":{"$ref":"Topic"},"response":{"$ref":"Topic"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"list":{"restPath":"series\/{seriesId}\/topics","rpcMethod":"moderator.topics.list","httpMethod":"GET","description":"Searches the topics within the specified series and returns the search results.","parameters":{"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"mode":{"restParameterType":"query","type":"string"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"response":{"$ref":"TopicList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"update":{"restPath":"series\/{seriesId}\/topics\/{topicId}","rpcMethod":"moderator.topics.update","httpMethod":"PUT","description":"Updates the specified topic within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"topicId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Topic within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","topicId"],"request":{"$ref":"Topic"},"response":{"$ref":"Topic"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}},"resources":{"submissions":{"methods":{"list":{"restPath":"series\/{seriesId}\/topics\/{topicId}\/submissions","rpcMethod":"moderator.topics.submissions.list","httpMethod":"GET","description":"Searches the submissions for the specified topic within the specified series and returns the search results.","parameters":{"author":{"restParameterType":"query","description":"Restricts the results to submissions by a specific author.","type":"string"},"hasAttachedVideo":{"restParameterType":"query","description":"Specifies whether to restrict to submissions that have videos attached.","type":"boolean"},"includeVotes":{"restParameterType":"query","description":"Specifies whether to include the current user\'s vote","type":"boolean"},"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"q":{"restParameterType":"query","description":"Search query.","type":"string"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"sort":{"restParameterType":"query","description":"Sort order.","type":"string"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"},"topicId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Topic within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","topicId"],"response":{"$ref":"SubmissionList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}}}', true));
    $this->votes = new apiServiceResource($this, $this->serviceName, 'votes', json_decode('{"methods":{"get":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me","rpcMethod":"moderator.votes.get","httpMethod":"GET","description":"Returns the votes by the authenticated user for the specified submission within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"userId":{"restParameterType":"query","type":"string"}},"parameterOrder":["seriesId","submissionId"],"response":{"$ref":"Vote"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"insert":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me","rpcMethod":"moderator.votes.insert","httpMethod":"POST","description":"Inserts a new vote by the authenticated user for the specified submission within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId","submissionId"],"request":{"$ref":"Vote"},"response":{"$ref":"Vote"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"list":{"restPath":"series\/{seriesId}\/votes\/@me","rpcMethod":"moderator.votes.list","httpMethod":"GET","description":"Lists the votes by the authenticated user for the given series.","parameters":{"max-results":{"restParameterType":"query","description":"Maximum number of results to return.","type":"integer","minimum":"0","maximum":"4294967295"},"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"start-index":{"restParameterType":"query","description":"Index of the first result to be retrieved.","type":"integer","minimum":"0","maximum":"4294967295"}},"parameterOrder":["seriesId"],"response":{"$ref":"VoteList"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]},"update":{"restPath":"series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me","rpcMethod":"moderator.votes.update","httpMethod":"PUT","description":"Updates the votes by the authenticated user for the specified submission within the specified series.","parameters":{"seriesId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"submissionId":{"restParameterType":"path","required":true,"description":"The decimal ID of the Submission within the Series.","type":"integer","minimum":"0","maximum":"4294967295"},"userId":{"restParameterType":"query","type":"string"}},"parameterOrder":["seriesId","submissionId"],"request":{"$ref":"Vote"},"response":{"$ref":"Vote"},"scopes":["https:\/\/www.googleapis.com\/auth\/moderator"]}}}', true));
  }

  /**
   * Returns the profile information for the authenticated user.
   *
   */
  public function getProfiles() {
    return $this->profiles->__call('get', array(array()));
  }

  /**
   * Updates the profile information for the authenticated user.
   *
   * @param $postBody 
   */
  public function updateProfiles($postBody) {
    return $this->profiles->__call('update', array(array('postBody' => $postBody)));
  }

  /**
   * Inserts a response for the specified submission in the specified topic within the specified series.
   *
   * @param $parentSubmissionId   integer The decimal ID of the parent Submission within the Series.
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $topicId   integer The decimal ID of the Topic within the Series.
   * @param $postBody 
   * @param $anonymous   boolean Set to true to mark the new submission as anonymous.
   */
  public function insertResponses($parentSubmissionId,
        $seriesId,
        $topicId,
        $postBody,
        $anonymous = null) {
    return $this->responses->__call('insert', array(array('parentSubmissionId' => $parentSubmissionId,
        'seriesId' => $seriesId,
        'topicId' => $topicId,
        'postBody' => $postBody,
        'anonymous' => $anonymous)));
  }

  /**
   * Lists or searches the responses for the specified submission within the specified series and returns the search results.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $author   string Restricts the results to submissions by a specific author.
   * @param $hasAttachedVideo   boolean Specifies whether to restrict to submissions that have videos attached.
   * @param $max_results   integer Maximum number of results to return.
   * @param $q   string Search query.
   * @param $sort   string Sort order.
   * @param $start_index   integer Index of the first result to be retrieved.
   */
  public function listResponses($seriesId,
        $submissionId,
        $author = null,
        $hasAttachedVideo = null,
        $max_results = null,
        $q = null,
        $sort = null,
        $start_index = null) {
    return $this->responses->__call('list', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'author' => $author,
        'hasAttachedVideo' => $hasAttachedVideo,
        'max-results' => $max_results,
        'q' => $q,
        'sort' => $sort,
        'start-index' => $start_index)));
  }

  /**
   * Returns the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   */
  public function getSeries($seriesId) {
    return $this->series->__call('get', array(array('seriesId' => $seriesId)));
  }

  /**
   * Inserts a new series.
   *
   * @param $postBody 
   */
  public function insertSeries($postBody) {
    return $this->series->__call('insert', array(array('postBody' => $postBody)));
  }

  /**
   * Searches the series and returns the search results.
   *
   * @param $max_results   integer Maximum number of results to return.
   * @param $q   string Search query.
   * @param $start_index   integer Index of the first result to be retrieved.
   */
  public function listSeries($max_results = null,
        $q = null,
        $start_index = null) {
    return $this->series->__call('list', array(array('max-results' => $max_results,
        'q' => $q,
        'start-index' => $start_index)));
  }

  /**
   * Updates the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $postBody 
   */
  public function updateSeries($seriesId,
        $postBody) {
    return $this->series->__call('update', array(array('seriesId' => $seriesId,
        'postBody' => $postBody)));
  }

  /**
   * Returns the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $includeVotes   boolean Specifies whether to include the current user's vote
   * @param $lang   string The language code for the language the client prefers resuls in.
   */
  public function getSubmissions($seriesId,
        $submissionId,
        $includeVotes = null,
        $lang = null) {
    return $this->submissions->__call('get', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'includeVotes' => $includeVotes,
        'lang' => $lang)));
  }

  /**
   * Inserts a new submission in the specified topic within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $topicId   integer The decimal ID of the Topic within the Series.
   * @param $postBody 
   * @param $anonymous   boolean Set to true to mark the new submission as anonymous.
   */
  public function insertSubmissions($seriesId,
        $topicId,
        $postBody,
        $anonymous = null) {
    return $this->submissions->__call('insert', array(array('seriesId' => $seriesId,
        'topicId' => $topicId,
        'postBody' => $postBody,
        'anonymous' => $anonymous)));
  }

  /**
   * Deletes the specified tag from the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $tagId   string 
   */
  public function deleteTags($seriesId,
        $submissionId,
        $tagId) {
    return $this->tags->__call('delete', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'tagId' => $tagId)));
  }

  /**
   * Inserts a new tag for the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $postBody 
   */
  public function insertTags($seriesId,
        $submissionId,
        $postBody) {
    return $this->tags->__call('insert', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'postBody' => $postBody)));
  }

  /**
   * Lists all tags for the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   */
  public function listTags($seriesId,
        $submissionId) {
    return $this->tags->__call('list', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId)));
  }

  /**
   * Returns the specified topic from the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $topicId   integer The decimal ID of the Topic within the Series.
   */
  public function getTopics($seriesId,
        $topicId) {
    return $this->topics->__call('get', array(array('seriesId' => $seriesId,
        'topicId' => $topicId)));
  }

  /**
   * Inserts a new topic into the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $postBody 
   */
  public function insertTopics($seriesId,
        $postBody) {
    return $this->topics->__call('insert', array(array('seriesId' => $seriesId,
        'postBody' => $postBody)));
  }

  /**
   * Searches the topics within the specified series and returns the search results.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $max_results   integer Maximum number of results to return.
   * @param $mode   string 
   * @param $q   string Search query.
   * @param $start_index   integer Index of the first result to be retrieved.
   */
  public function listTopics($seriesId,
        $max_results = null,
        $mode = null,
        $q = null,
        $start_index = null) {
    return $this->topics->__call('list', array(array('seriesId' => $seriesId,
        'max-results' => $max_results,
        'mode' => $mode,
        'q' => $q,
        'start-index' => $start_index)));
  }

  /**
   * Updates the specified topic within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $topicId   integer The decimal ID of the Topic within the Series.
   * @param $postBody 
   */
  public function updateTopics($seriesId,
        $topicId,
        $postBody) {
    return $this->topics->__call('update', array(array('seriesId' => $seriesId,
        'topicId' => $topicId,
        'postBody' => $postBody)));
  }

  /**
   * Returns the votes by the authenticated user for the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $userId   string 
   */
  public function getVotes($seriesId,
        $submissionId,
        $userId = null) {
    return $this->votes->__call('get', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'userId' => $userId)));
  }

  /**
   * Inserts a new vote by the authenticated user for the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $postBody 
   */
  public function insertVotes($seriesId,
        $submissionId,
        $postBody) {
    return $this->votes->__call('insert', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'postBody' => $postBody)));
  }

  /**
   * Lists the votes by the authenticated user for the given series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $max_results   integer Maximum number of results to return.
   * @param $start_index   integer Index of the first result to be retrieved.
   */
  public function listVotes($seriesId,
        $max_results = null,
        $start_index = null) {
    return $this->votes->__call('list', array(array('seriesId' => $seriesId,
        'max-results' => $max_results,
        'start-index' => $start_index)));
  }

  /**
   * Updates the votes by the authenticated user for the specified submission within the specified series.
   *
   * @param $seriesId   integer The decimal ID of the Series.
   * @param $submissionId   integer The decimal ID of the Submission within the Series.
   * @param $postBody 
   * @param $userId   string 
   */
  public function updateVotes($seriesId,
        $submissionId,
        $postBody,
        $userId = null) {
    return $this->votes->__call('update', array(array('seriesId' => $seriesId,
        'submissionId' => $submissionId,
        'postBody' => $postBody,
        'userId' => $userId)));
  }

  /**
   * @return the $io
   */
  public function getIo() {
    return $this->io;
  }

  /**
   * @return the $version
   */
  public function getVersion() {
    return $this->version;
  }

  /**
   * @return the $restBasePath
   */
  public function getRestBasePath() {
    return $this->restBasePath;
  }

  /**
   * @return the $rpcPath
   */
  public function getRpcPath() {
    return $this->rpcPath;
  }
}

